<project name="animal game" version="1"><notes>Be sure to save the project after playing so that it will remember the animals you teach it!</notes><thumbnail></thumbnail><stage costume="0" threadsafe="false" id="0"><pentrails></pentrails><variables></variables><costumes><list id="2"></list></costumes><sounds><list id="3"></list></sounds><blocks></blocks><scripts></scripts><sprites><sprite name="Sprite" x="0" y="0" heading="90" scale="1" rotation="1" draggable="true" costume="1" color="80,80,80" id="7"><variables></variables><costumes><list id="9"><item><costume name="alonzo.gif" center-x="48" center-y="48" image="" id="10"/></item></list></costumes><sounds><list id="11"></list></sounds><blocks></blocks><scripts><script x="15" y="20"><block s="receiveKey"><l>left arrow</l></block><block s="doWaitUntil"><block s="reportKeyPressed"><l>right arrow</l></block></block><block s="doSetVar"><l>tree</l><custom-block s="make-leaf %txt"><l>rabbit</l></custom-block></block></script><script x="17" y="137"><block s="receiveGo"></block><block s="doSayFor"><l>Think of an animal.</l><l>2</l></block><block s="doSayFor"><l>I'll guess what it is by asking questions.</l><l>2</l></block><block s="doSayFor"><l>You can say Y for YES and N for NO.</l><l>2</l></block><custom-block s="animal-game %l %cmdRing"><block var="tree"/><block s="reifyScript"><script><block s="doSetVar"><l>tree</l><l></l></block></script><list></list></block></custom-block></script></scripts></sprite><watcher var="tree" x="10" y="10" color="243,118,29" hidden="hidden"/></sprites></stage><blocks><block-definition s="make-leaf %'animal'" type="reporter" category="operators"><inputs><input type="%txt"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><l>leaf</l><block var="animal"/></list></block></block></script></block-definition><block-definition s="a/an %'noun'" type="reporter" category="operators"><inputs><input type="%txt"></input></inputs><script><block s="doIfElse"><block s="reportListContainsItem"><block s="reportNewList"><list><l>a</l><l>e</l><l>i</l><l>o</l><l>u</l></list></block><block s="reportLetter"><l>1</l><block var="noun"/></block></block><script><block s="doReport"><block s="reportJoinWords"><list><l>an </l><block var="noun"/></list></block></block></script><script><block s="doReport"><block s="reportJoinWords"><list><l>a </l><block var="noun"/></list></block></block></script></block></script></block-definition><block-definition s="answer %'leaf'" type="reporter" category="operators"><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><block var="leaf"/></block></block></script></block-definition><block-definition s="branch? %'node'" type="reporter" category="operators"><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="node"/></block><l>branch</l></block></block></script></block-definition><block-definition s="leaf? %'node'" type="reporter" category="operators"><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportEquals"><block s="reportListItem"><l>1</l><block var="node"/></block><l>leaf</l></block></block></script></block-definition><block-definition s="make-branch %'question' %'yes' %'no'" type="reporter" category="operators"><inputs><input type="%txt"></input><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><l>branch</l><block var="question"/><block var="yes"/><block var="no"/></list></block></block></script></block-definition><block-definition s="no-branch %'branch'" type="reporter" category="operators"><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>4</l><block var="branch"/></block></block></script></block-definition><block-definition s="question %'branch'" type="reporter" category="operators"><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>2</l><block var="branch"/></block></block></script></block-definition><block-definition s="yes-branch %'branch'" type="reporter" category="operators"><inputs><input type="%l"></input></inputs><script><block s="doReport"><block s="reportListItem"><l>3</l><block var="branch"/></block></block></script></block-definition><block-definition s="set-no! %'branch' %'new'" type="command" category="operators"><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReplaceInList"><l>4</l><block var="branch"/><block var="new"/></block></script></block-definition><block-definition s="set-yes! %'branch' %'new'" type="command" category="operators"><inputs><input type="%l"></input><input type="%l"></input></inputs><script><block s="doReplaceInList"><l>3</l><block var="branch"/><block var="new"/></block></script></block-definition><block-definition s="animal-game %'tree' %'setter'" type="command" category="other"><inputs><input type="%l"></input><input type="%cmdRing"></input></inputs><script><block s="doDeclareVariables"><list><l>animal</l><l>question</l></list></block><block s="doIfElse"><custom-block s="branch? %l"><block var="tree"/></custom-block><script><block s="doIfElse"><custom-block s="yorn %txt"><custom-block s="question %l"><block var="tree"/></custom-block></custom-block><script><custom-block s="animal-game %l %cmdRing"><custom-block s="yes-branch %l"><block var="tree"/></custom-block><block s="reifyScript"><script><custom-block s="set-yes! %l %l"><block var="tree"/><l/></custom-block></script><list></list></block></custom-block></script><script><custom-block s="animal-game %l %cmdRing"><custom-block s="no-branch %l"><block var="tree"/></custom-block><block s="reifyScript"><script><custom-block s="set-no! %l %l"><block var="tree"/><l/></custom-block></script><list></list></block></custom-block></script></block></script><script><block s="doIfElse"><custom-block s="yorn %txt"><block s="reportJoinWords"><list><l>Is it </l><custom-block s="a/an %txt"><block s="reportJoinWords"><list><custom-block s="answer %l"><block var="tree"/></custom-block><l>?</l></list></block></custom-block></list></block></custom-block><script><block s="doSayFor"><l>I win!!!</l><l>2</l></block></script><script><block s="doAsk"><l>I give up.  What is it?</l></block><block s="doSetVar"><l>animal</l><block s="reportLastAnswer"></block></block><block s="doAsk"><block s="reportJoinWords"><list><l>Please tell me a question whose answer is YES for </l><block s="reportJoinWords"><list><custom-block s="a/an %txt"><block var="animal"/></custom-block><block s="reportJoinWords"><list><l> and NO for </l><custom-block s="a/an %txt"><block s="reportJoinWords"><list><custom-block s="answer %l"><block var="tree"/></custom-block><l>.</l></list></block></custom-block></list></block></list></block></list></block></block><block s="doSetVar"><l>question</l><block s="reportLastAnswer"></block></block><block s="doRun"><block var="setter"/><list><custom-block s="make-branch %txt %l %l"><block var="question"/><custom-block s="make-leaf %txt"><block var="animal"/></custom-block><block var="tree"/></custom-block></list></block><block s="doSayFor"><l>Thanks!  Now I know better.</l><l>2</l></block></script></block></script></block></script></block-definition><block-definition s="yorn %'question'" type="predicate" category="sensing"><inputs><input type="%txt"></input></inputs><script><block s="doAsk"><block var="question"/></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><l>1</l><block s="reportLastAnswer"></block></block><l>Y</l></block><script><block s="doReport"><block s="reportTrue"></block></block></script></block><block s="doIf"><block s="reportEquals"><block s="reportLetter"><l>1</l><block s="reportLastAnswer"></block></block><l>N</l></block><script><block s="doReport"><block s="reportFalse"></block></block></script></block><block s="doReport"><custom-block s="yorn %txt"><block var="question"/></custom-block></block></script></block-definition><block-definition s="join words %'words'" type="reporter" category="operators"><inputs><input type="%mult%s"></input></inputs><script><block s="doIf"><block s="reportEquals"><block s="reportCDR"><block var="words"/></block><block s="reportNewList"><list></list></block></block><script><block s="doReport"><block s="reportListItem"><l>1</l><block var="words"/></block></block></script></block><block s="doReport"><block s="reportJoinWords"><list><block s="reportListItem"><l>1</l><block var="words"/></block><block s="reportJoinWords"><list><l> </l><block s="evaluate"><block s="reifyReporter"><autolambda><custom-block s="join words %mult%s"><list></list></custom-block></autolambda><list></list></block><block s="reportCDR"><block var="words"/></block></block></list></block></list></block></block></script></block-definition></blocks><variables><variable name="tree"><list id="376"><item><l>leaf</l></item><item><l>rabbit</l></item></list></variable></variables></project>
